<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: Popup</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: Popup</h1>

    




<section>

<header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>Popup</h2>
        
            <div class="class-description"><p>This class cannot be instantiated directly. Instead, use WebAuth.popup</p></div>
        
    
</header>

<article>
    <div class="container-overview">
    
        















<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="web-auth_popup.js.html">web-auth/popup.js</a>, <a href="web-auth_popup.js.html#line19">line 19</a>
    </li></ul></dd>
    

    

    

    
</dl>




















    
    </div>

    

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="authorize"><span class="type-signature"></span>authorize<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Shows inside a new window the hosted login page (<code>/authorize</code>) in order to start a new authN/authZ transaction and post its result using <code>postMessage</code>.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">
                <h6>Properties</h6>
                

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>clientID</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>the Client ID found on your Application settings page</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>redirectUri</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>url that the Auth0 will redirect after Auth with the Authorization Response</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>responseType</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>type of the response used by OAuth 2.0 flow. It can be any space separated list of the values <code>code</code>, <code>token</code>, <code>id_token</code>. <a href="https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html">https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html</a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>responseMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>how the Auth response is encoded and redirected back to the client. Supported values are <code>query</code>, <code>fragment</code> and <code>form_post</code>. The <code>query</code> value is only supported when <code>responseType</code> is <code>code</code>. <a href="https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#ResponseModes">https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#ResponseModes</a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>value used to mitigate XSRF attacks. <a href="https://auth0.com/docs/protocols/oauth2/oauth-state">https://auth0.com/docs/protocols/oauth2/oauth-state</a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>nonce</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>value used to mitigate replay attacks when using Implicit Grant. <a href="https://auth0.com/docs/api-auth/tutorials/nonce">https://auth0.com/docs/api-auth/tutorials/nonce</a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>scopes to be requested during Auth. e.g. <code>openid email</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>audience</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>identifier of the resource server who will consume the access token issued after Auth</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>organization</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>the Id of an organization to log in to</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>invitation</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>the ID of an invitation to accept. This is available from the user invitation URL that is given when participating in a user invitation flow</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>owp</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>determines if Auth0 should render the relay page or not and the caller is responsible of handling the response.</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>cb</code></td>
            

            <td class="type">
            
                
<span class="param-type">authorizeCallback</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="web-auth_popup.js.html">web-auth/popup.js</a>, <a href="web-auth_popup.js.html#line140">line 140</a>
    </li></ul></dd>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="https://auth0.com/docs/api/authentication#authorize-client">https://auth0.com/docs/api/authentication#authorize-client</a></li>
        </ul>
    </dd>
    

    
</dl>




















        
            

    

    
    <h4 class="name" id="callback"><span class="type-signature"></span>callback<span class="signature">(options)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Handles the popup logic for the callback page.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">
                <h6>Properties</h6>
                

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>hash</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>the url hash. If not provided it will extract from window.location.hash</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>value originally sent in <code>state</code> parameter to <code>authorize</code> to mitigate XSRF</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>nonce</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>value originally sent in <code>nonce</code> parameter to <code>authorize</code> to prevent replay attacks</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="web-auth_popup.js.html">web-auth/popup.js</a>, <a href="web-auth_popup.js.html#line85">line 85</a>
    </li></ul></dd>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><code>parseHash</code></li>
        </ul>
    </dd>
    

    
</dl>




















        
            

    

    
    <h4 class="name" id="loginWithCredentials"><span class="type-signature"></span>loginWithCredentials<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Performs authentication with username/email and password with a database connection inside a new window</p>
<p>This method is not compatible with API Auth so if you need to fetch API tokens with audience
you should use <code>authorize</code> or <code>login</code>.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">
                <h6>Properties</h6>
                

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>redirectUri</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>url that the Auth0 will redirect after Auth with the Authorization Response</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>responseType</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>type of the response used. It can be any of the values <code>code</code> and <code>token</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>responseMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>how the AuthN response is encoded and redirected back to the client. Supported values are <code>query</code> and <code>fragment</code>. The <code>query</code> value is only supported when <code>responseType</code> is <code>code</code>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>scopes to be requested during AuthN. e.g. <code>openid email</code></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>cb</code></td>
            

            <td class="type">
            
                
<span class="param-type">credentialsCallback</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="web-auth_popup.js.html">web-auth/popup.js</a>, <a href="web-auth_popup.js.html#line240">line 240</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="passwordlessVerify"><span class="type-signature"></span>passwordlessVerify<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Verifies the passwordless TOTP and redirects to finish the passwordless transaction</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">
                <h6>Properties</h6>
                

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p><code>sms</code> or <code>email</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>phoneNumber</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p>only if type = sms</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>email</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p>only if type = email</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>connection</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p>the connection name</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>verificationCode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p>the TOTP code</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>cb</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="web-auth_popup.js.html">web-auth/popup.js</a>, <a href="web-auth_popup.js.html#line272">line 272</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="preload"><span class="type-signature"></span>preload<span class="signature">(options)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Initializes the popup window and returns the instance to be used later in order to avoid being blocked by the browser.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last"><p>receives the window height and width and any other window feature to be sent to window.open</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="web-auth_popup.js.html">web-auth/popup.js</a>, <a href="web-auth_popup.js.html#line51">line 51</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="signupAndLogin"><span class="type-signature"></span>signupAndLogin<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Signs up a new user and automatically logs the user in after the signup.</p>
<p>This method is not compatible with API Auth so if you need to fetch API tokens with audience
you should use <code>authorize</code> or <code>signupAndAuthorize</code>.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">
                <h6>Properties</h6>
                

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>email</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p>user email address</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>password</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p>user password</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>connection</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"><p>name of the connection where the user will be created</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>cb</code></td>
            

            <td class="type">
            
                
<span class="param-type">credentialsCallback</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="web-auth_popup.js.html">web-auth/popup.js</a>, <a href="web-auth_popup.js.html#line307">line 307</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Authentication.html">Authentication</a></li><li><a href="Management.html">Management</a></li><li><a href="Popup.html">Popup</a></li><li><a href="Redirect.html">Redirect</a></li><li><a href="WebAuth.html">WebAuth</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Mon Oct 06 2025 14:15:35 GMT+0530 (India Standard Time)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>